﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MagicBag.CRM.Model;

namespace MagicBag.CRM.IDAL
{
    /// <summary>
    /// 角色数据访问接口
    /// </summary>
    public interface IRole
    {
        /// <summary>
        /// 添加角色
        /// </summary>
        /// <param name="role"></param>
        /// <returns></returns>
        int Insert(Role role);

        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int Delete(int id);

        /// <summary>
        /// 修改角色
        /// </summary>
        /// <param name="role"></param>
        /// <returns></returns>
        int Update(Role role);

        /// <summary>
        /// 根据ID获取角色
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Role GetRole(int id);

        /// <summary>
        /// 获取所有角色
        /// </summary>
        /// <returns></returns>
        IList<Role> GetRoles();
    }
}
